home *** CD-ROM | disk | FTP | other *** search
- /********************************************************************/
- /* */
- /* POOPDRAW.h */
- /* */
- /* This file precompiles into PoopDrawInc, included throughout */
- /* */
- /********************************************************************/
-
- #include <MacHeaders>
-
- /********************************************************************/
- /* */
- /* Data Structures */
- /* */
- /********************************************************************/
-
- typedef long *LPtr;
- typedef int *IPtr;
-
- /*--------------------------------------------------------------------*/
- typedef struct
- {
- short penSize;
- short penPat;
- short fillPat;
-
- } DrawStateRec, *DrawStatePtr, **DrawStateHandle;
-
- /*--------------------------------------------------------------------*/
- /* The fields to be included in every Object */
- /*--------------------------------------------------------------------*/
- #define __JUMPTABLE void (*dispatch)();
- #define _FLD1 WindowPtr port;
- #define _FLD2 int class;
- #define _FLD3 int length;
- #define _FLD4 Rect bounds;
- #define _FLD5 int attributes;
-
-
- #define _StdObjectFields __JUMPTABLE _FLD1 _FLD2 _FLD3 _FLD4 _FLD5
-
- /********************************************************************/
-
- typedef struct Object
- {
- _StdObjectFields
- } ObjectRec,*ObjectPtr,**ObjectHandle;
- /*------------------------------------------------------------------*/
-
- typedef struct
- {
- _StdObjectFields
- DrawStateRec drawState;
-
- } DrawObjectRec,*DrawObjectPtr,**DrawObjectHandle;
-
- /*--------------------------------------------------------------------*/
-
- typedef struct
- {
- Str255 fName; /* Filename for title bar */
- Rect wRect; /* Position of the window */
- int fileVol; /* volume where file resides */
- short curTool; /* The current Tool */
- short curPat; /* The current Pattern */
- short curWeight; /* The current Line Weight */
- DrawStateRec drawState; /* draw state to give new objects */
- long nObjects; /* how many objects in document */
- }
- FileHeaderRec,*FileHeaderPtr;
-
- /********************************************************************/
- /* */
- /* MESSAGES in no special order! */
- /* */
- /********************************************************************/
-
-
- enum { INIT = 110,DISPOSE,OPEN,CLOSE };
- enum { MOUSEDOWN = 120,KEYDOWN,UPDATE,ACTIVATE,DEACTIVATE,IDLE };
- enum { UNDO = 130,CUT,COPY,PASTE,ERASE,INVAL };
- enum { MOVE = 140,RESIZE,GROW,HIDE,SHOW };
-
- enum { FILL = 150,PENSIZE,PENPAT };
- enum { FRAME = 160,DRAW ,DRAWHANDLES };
- enum { SAVE = 170, SAVEAS, PACK, UNPACK };
- enum { BRINGTOFRONT = 180, SENDTOBACK, GROUP, UNGROUP };
- enum { SELECT = 190,UNSELECT,CLRSELECT,SELECTRECT,DUPLICATE };
- enum { ADDOBJECT = 200, DELOBJECT,FIND,GETSIZE};
- enum { GETDRAWSTATE = 210,GETTOOL, SETACTIVETEXT,CLRACTIVETEXT};
- enum { FIRST = 220, NEXT, PREV,LAST,APPEND,LOAD,SETLEN,TRACK};
- /* ------------------------------------------------------------ */
- /* OBJECTS */
- /* ------------------------------------------------------------ */
-
- enum { LIST=10,DRAWWIND,DRAWPANEL};
-
- /* ------------------------------------------------------------ */
- /* ATTRIBUTES */
- /* ------------------------------------------------------------ */
-
- enum { VisibleBit=1, LockedBit, SelectedBit, DirtyBit,VirginBit };
- /* ------------------------------------------------------------ */
- /* BOXES IN PALETTE */
- /* ------------------------------------------------------------ */
-
- enum { POINTER = 1,LINE,RECT,OVAL,TEXT};
- enum { BLACK = 6,DKGRAY,GRAY,LTGRAY,WHITE};
- enum { LINEWT0 = 11,LINEWT1,LINEWT2,LINEWT3};
-
- /* ------------------------------------------------------------ */
- /* RESOURCE IDS */
- /* ------------------------------------------------------------ */
-
- #define AboutID 1000
- #define HelpID 1001
- #define ToolPaletteID 1000
- enum { WHITEPAT=1001,LTGRAYPAT,GRAYPAT,DKGRAYPAT,BLACKPAT };
- #define NUMMENUS 4
- enum { AppleMenuID=1001, FileMenuID, EditMenuID, ObjectMenuID };
-
- /* ------------------------------------------------------------ */
- /* ITEM CHARACTERISTICS */
- /* ------------------------------------------------------------ */
-
- #define PALETTEWIDTH 26
- #define PALETTEHEIGHT 17
- #define HANDLEWIDTH 5
- #define SELF ObjectH /* smalltalk copycat */
-
-
-
- #include "defines.h"
- #include "Prototypes.h"
-
-